﻿using System.Collections.Generic;
using System.Collections;

namespace QuizzAdminData
{
    /// <summary>
    /// Klasse voor object van DB
    /// </summary>
    /// <author>Kenny Vaneetvelde</author>
    public class Spel
    {

        private int _id;
        private string _dateString;

        private List<Vraag> _vragen;
        private List<Team> _teams;

        private Hashtable _teams_Scores = new Hashtable();

        public int Id
        {
            get
            {
                return this._id;
            }
            set
            {
                this._id = value;
            }
        }

        public List<Team> Teams
        {
            get
            {
                return this._teams;
            }
            set
            {
                this._teams = value;
            }
        }

        public string DateString
        {
            get
            {
                return this._dateString;
            }
            set
            {
                this._dateString = value;
            }
        }

        public Hashtable Teams_Scores
        {
            get
            {
                return this._teams_Scores;
            }
            set
            {
                this._teams_Scores = value;
            }
        }

        public List<Vraag> Vragen
        {
            get
            {
                return this._vragen;
            }
            set
            {
                this._vragen = value;
            }
        }

        public void VoegVraagToe(Vraag v)
        {
            this._vragen.Add(v);
        }

        public void UpdateScores()
        {
            this._teams_Scores = SpelDB.GetTeamsScores(this._id);
        }

    }

}